<?php
namespace app\index\controller;
use \think\Controller;
use \think\Db;
class UserPost extends Controller
{   
    // 从数据库中取出当前用户资料并加载模版
    public function index()
    {
        $data = Db::table('post')->where('uid',session('uid'))->select();
        return $this->fetch('',['data'=>$data]);
    }

}
?>